package com.masiyi.springsecuritydemo.controller;

import com.masiyi.springsecuritydemo.service.MyUserDetailService;
import com.masiyi.springsecuritydemo.entity.UserDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author masiyi
 * @Date 2023/12/20
 * @PackageName:com.masiyi.springsecuritydemo.controller
 * @ClassName: UserController
 * @Description: TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private MyUserDetailService myUserDetailService;


    @PostMapping("/register")
    public Boolean register(@RequestBody UserDetail userDetailInfo){
        return myUserDetailService.insertUser(userDetailInfo);
    }

}
